using System;
using UnityEngine;

namespace NodeCanvas.Variables
{
	[Serializable]
	public class BBVar : BBVariable, IMultiCastable
	{
		[SerializeField]
		private string _typeName = typeof(object).AssemblyQualifiedName;

		public override Type varType
		{
			get
			{
				return type;
			}
		}

		public Type baseType
		{
			get
			{
				return typeof(object);
			}
		}

		public Type type
		{
			get
			{
				return Type.GetType(_typeName);
			}
			set
			{
				_typeName = value.AssemblyQualifiedName;
			}
		}

		public object value
		{
			get
			{
				return Read<object>();
			}
			set
			{
				Write(value);
			}
		}

		public BBVar()
		{
			base.blackboardOnly = true;
		}
	}
}
